<extend name="Public/base" />
<block name="style">
    <link rel="stylesheet" type="text/css" href="__PUBLIC__/static/bootstrap3.3.7/css/bootstrap.css">
</block>
<block name="body">
    <!-- 标题栏 -->
    <div class="main-title">
        <h2 style="cursor: pointer" onClick="javascript :history.back(-1);">病历详情 [返回]</h2>
    </div>


    <div class="panel panel-default" style="width: 80%;">
        <div class="panel-heading">
            <h3 class="panel-title">
                患者信息
            </h3>
        </div>
        <div class="panel-body">
            <div style="display: flex;flex-direction: row;flex-wrap:wrap;justify-content:space-between;margin-top: 20px;margin-bottom: 20px;">
                <div class="form-item cf" style="padding-bottom: 8px;">
                    <div class="controls">
                        <label class="item-label">系统编号</label>
                        <input type="text" readonly class="text " name="hospital" value="{$info.id}">
                    </div>
                </div>
                <div class="form-item cf" style="padding-bottom: 8px;">
                    <div class="controls">
                        <label class="item-label">年龄</label>
                        <input type="text" readonly class="text " name="hospital" value="{$info.age}">
                    </div>
                </div>
                <div class="form-item cf" style="padding-bottom: 8px;">
                    <div class="controls">
                        <label class="item-label">病人姓名</label>
                        <input type="text" readonly class="text " name="name" value="{$info.name}">
                    </div>
                </div>
                <div class="form-item cf" style="padding-bottom: 8px;">
                    <div class="controls">
                        <label class="item-label">性别</label>
                        <input type="text" readonly class="text " name="hospital" value="{$info.sex}">
                    </div>
                </div>
                <div class="form-item cf" style="padding-bottom: 8px;" >
                    <div class="controls">
                        <label class="item-label">婚姻</label>
                        <input type="text" readonly class="text " name="hospital" value="<if condition='$info.marriage_status eq 1 '>已婚<else /> 未婚</if>">
                    </div>
                </div>
                <div class="form-item cf" style="padding-bottom: 8px;">
                    <div class="controls">
                        <label class="item-label">职业</label>
                        <input type="text" readonly class="text " name="hospital" value="{$info.occupation}">
                    </div>
                </div>
                <div class="form-item cf" style="padding-bottom: 8px;">
                    <div class="controls">
                        <label class="item-label">籍贯</label>
                        <input type="text" readonly class="text " name="hospital" value="{$info.native_place}">
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="panel panel-default" style="width: 80%;">
        <div class="panel-heading">
            <h3 class="panel-title">
                现病史
            </h3>
        </div>
        <div class="panel-body">
            <div style="display: flex;flex-direction: row;flex-wrap:wrap;justify-content:space-between;margin-top: 20px;margin-bottom: 20px;">
                <div class="form-item cf" style="padding-bottom: 8px;">
                    <div class="controls" >
                        <label class="item-label">是否佩戴隐形眼镜</label>
                        <input type="text" class="text " readonly name="hospital" value="<if condition='$info.wear_glasses eq 1 '>是<else /> 否</if>" >
                    </div>
                </div>
                <div class="form-item cf" style="padding-bottom: 8px;">
                    <div class="controls">
                        <label class="item-label">带隐形眼镜年限</label>
                        <input type="text" class="text " readonly name="hospital" value="{$info.wear_year}">
                    </div>
                </div>
                <div class="form-item cf" style="padding-bottom: 8px;">
                    <div class="controls">
                        <label class="item-label">停戴周数</label>
                        <input type="text" class="text " readonly name="hospital" value="{$info.stop_wear_week}">
                    </div>
                </div>
                <div class="form-item cf" style="padding-bottom: 8px;">
                    <div class="controls">
                        <label class="item-label">近视时长</label>
                        <input type="text" class="text " readonly name="hospital" value="{$info.myopia_year}">
                    </div>
                </div>
                <div class="form-item cf" style="padding-bottom: 8px;">
                    <div class="controls">
                        <label class="item-label">配镜时长</label>
                        <input type="text" class="text " readonly name="hospital" value="{$info.optician_year}">
                    </div>
                </div>
                <div class="form-item cf" style="padding-bottom: 8px;">
                    <div class="controls">
                        <label class="item-label">现镜OD</label>
                        <input type="text" class="text " readonly name="hospital" value="{$info.mirror_od}">
                    </div>
                </div>
                <div class="form-item cf" style="padding-bottom: 8px;">
                    <div class="controls">
                        <label class="item-label">现镜OS</label>
                        <input type="text" class="text " readonly name="hospital" value="{$info.mirror_os}">
                    </div>
                </div>
                <div class="form-item cf" style="padding-bottom: 8px;">
                    <div class="controls">
                        <label class="item-label">2年内屈光度变化</label>
                        <input type="text" class="text " readonly name="hospital" value="{$info.diopte_change}">
                    </div>
                </div>
                <div class="form-item cf" style="padding-bottom: 8px;">
                    <div class="controls">
                        <label class="item-label">眼睑状况</label>
                        <input type="text" class="text " readonly name="hospital" value="{$info.eyelid_status}">
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="panel-heading">
        <h3 class="panel-title">
            既往史及家族史
        </h3>
    </div>
    <div class="panel-body">
        <div style="display: flex;flex-direction: column;justify-content:space-between;margin-top: 20px;margin-bottom: 20px;">
            <div class="form-item cf">
                <div class="controls">
                    <input type="text" class="text input-large" readonly name="hospital" value="{$info.past_history}">
                </div>
            </div>
        </div>
    </div>

    <div class="panel-heading">
        <h3 class="panel-title">
            患者诉求
        </h3>
    </div>
    <div class="panel-body">
        <div style="display: flex;flex-direction: column;justify-content:space-between;margin-top: 20px;margin-bottom: 20px;">
            <div class="form-item cf">
                <div class="controls">
                    <textarea cols="100" readonly rows="3">{$info.patient_appeall}</textarea>
                </div>
            </div>
        </div>
    </div>

    <div class="panel-heading">
        <h3 class="panel-title">
            处理结果
        </h3>
    </div>
    <div class="panel-body">
        <div style="display: flex;flex-direction: column;justify-content:space-between;margin-top: 20px;margin-bottom: 20px;">
            <div class="form-item cf">
                <div class="controls">
                    <textarea cols="100" readonly rows="3">{$info.processing_results}</textarea>
                </div>
            </div>
        </div>
    </div>


    <div class="panel-heading">
        <h3 class="panel-title">
            病历资料
        </h3>
    </div>



        <div class="panel panel-default" style="margin-bottom: 1px;">
            <div class="panel-heading">
                <h4 class="panel-title">
                    <span>id</span>
                    <span style="margin-left: 100px;margin-right: 300px;">病历录入时间</span>


                        <sapn id ="showAll">全部展开</sapn>

                </h4>
            </div>
        </div>
        <notempty name="_list">
            <volist name="_list" id="item">
                <div class="panel panel-default" style="margin-bottom: 1px;">
                    <div class="panel-heading">
                        <h4 class="panel-title">
                            <span>{$item['id']}</span>
                            <span style="margin-left: 100px;margin-right: 300px;">{$item['create_time']}</span>

                            <a data-toggle="collapse" data-parent="#accordion"
                               href="#collapse_{$item[id]}">
                                <sapn>详情</sapn>
                            </a>
                        </h4>
                    </div>
                    <div id="collapse_{$item[id]}" class="panel-collapse collapse point">
                        <div class="panel-body">
                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h3 class="panel-title">
                                        右眼
                                    </h3>
                                </div>
                                <div class="panel-body">
                                    <div style="display: flex;flex-direction: column">
                                        <div style="display:flex;flex-direction: row">
                                            <span>&nbsp;&nbsp;显然验光&nbsp;&nbsp;</span>
                                            <input type="text" readonly value="{$item['r_apparent_optometry_ds']}" style="width: 50px;" />DS
                                            <input type="text" readonly value="{$item['r_apparent_optometry_dc']}" style="width: 50px;" />DC
                                            <input type="text" readonly value="{$item['r_apparent_optometry_degree']}" style="width: 50px;" />°=
                                            <input type="text" readonly value="{$item['r_apparent_optometry_equals']}" style="width: 50px;" />
                                        </div>
                                        <div style="display:flex;flex-direction: row">
                                            <span>&nbsp;&nbsp;散瞳验光&nbsp;&nbsp;</span>
                                            <input type="text" readonly value="{$item['r_cycloplegic_refraction_ds']}" style="width: 50px;" />DS
                                            <input type="text" readonly value="{$item['r_cycloplegic_refraction_dc']}" style="width: 50px;" />DC
                                            <input type="text" readonly value="{$item['r_cycloplegic_refraction_degree']}" style="width: 50px;" />°=
                                            <input type="text" readonly value="{$item['r_cycloplegic_refraction_equals']}" style="width: 50px;" />
                                        </div>
                                        <div style="display:flex;flex-direction: row">
                                            <span>&nbsp;&nbsp;&nbsp;&nbsp;眼&nbsp;&nbsp;&nbsp;压&nbsp;&nbsp;&nbsp;&nbsp;</span><input type="text" readonly value="{$item['r_intraocular_pressure']}" style="width: 50px;" />mmHg
                                        </div>
                                        <div style="display:flex;flex-direction: row">
                                            <span>&nbsp;&nbsp;角膜横径&nbsp;&nbsp;</span><input type="text" value="{$item['r_corneal_diameter']}"readonly  style="width: 50px;" />mm
                                        </div>
                                        <div style="display:flex;flex-direction: row">
                                            <span>最薄点厚度</span><input type="text" value="{$item['r_thin_thickness']}" readonly style="width: 50px;" />μm
                                        </div>
                                        <div style="display:flex;flex-direction: row">
                                            <span>&nbsp;&nbsp;最大曲率&nbsp;&nbsp;</span><input type="text" value="{$item['r_max_curvature']}" readonly  style="width: 50px;" />D
                                        </div>
                                        <if condition="$item['r_overview_img']">
                                            <center> <img style="width: 700px;" src="{$item['r_overview_img']}"/></center>
                                            <center>右眼OVerView总览图</center>
                                        </if>
                                        <if condition="$item['r_bad_img']">
                                            <center><img style="width: 700px;" src="{$item['r_bad_img']}"   /></center>
                                            <center>右眼BAD分析图</center>
                                        </if>
                                        <if condition="$item['r_four_map_img']">
                                            <center><img style="width: 700px;" src="{$item['r_four_map_img']}"   /></center>
                                            <center>右眼屈光四图报告</center>
                                        </if>
                                        <if condition="$item['r_topometric_img']">
                                            <center><img style="width: 700px;" src="{$item['r_topometric_img']}"   /></center>
                                            <center>右眼圆锥角膜分级表</center>
                                        </if>
                                    </div>

                                </div>
                            </div>

                            <div class="panel panel-default">
                                <div class="panel-heading">
                                    <h3 class="panel-title">
                                        左眼
                                    </h3>
                                </div>
                                <div class="panel-body">
                                    <div style="display: flex;flex-direction: column">
                                        <div style="display:flex;flex-direction: row">
                                            <span>&nbsp;&nbsp;显然验光&nbsp;&nbsp;</span>
                                            <input type="text" readonly value="{$item['l_apparent_optometry_ds']}" style="width: 50px;" />DS
                                            <input type="text" readonly value="{$item['l_apparent_optometry_dc']}" style="width: 50px;" />DC
                                            <input type="text" readonly value="{$item['l_apparent_optometry_degree']}" style="width: 50px;" />°=
                                            <input type="text" readonly value="{$item['l_apparent_optometry_equals']}" style="width: 50px;" />
                                        </div>
                                        <div style="display:flex;flex-direction: row">
                                            <span>&nbsp;&nbsp;散瞳验光&nbsp;&nbsp;</span>
                                            <input type="text" readonly value="{$item['l_cycloplegic_refraction_ds']}" style="width: 50px;" />DS
                                            <input type="text" readonly value="{$item['l_cycloplegic_refraction_dc']}" style="width: 50px;" />DC
                                            <input type="text" readonly value="{$item['l_cycloplegic_refraction_degree']}" style="width: 50px;" />°=
                                            <input type="text" readonly value="{$item['l_cycloplegic_refraction_equals']}" style="width: 50px;" />
                                        </div>
                                        <div style="display:flex;flex-direction: row">
                                            <span>&nbsp;&nbsp;&nbsp;&nbsp;眼&nbsp;&nbsp;&nbsp;压&nbsp;&nbsp;&nbsp;&nbsp;</span><input type="text" readonly value="{$item['l_intraocular_pressure']}" style="width: 50px;" />mmHg
                                        </div>
                                        <div style="display:flex;flex-direction: row">
                                            <span>&nbsp;&nbsp;角膜横径&nbsp;&nbsp;</span><input type="text" value="{$item['l_corneal_diameter']}"readonly  style="width: 50px;" />mm
                                        </div>
                                        <div style="display:flex;flex-direction: row">
                                            <span>最薄点厚度</span><input type="text" value="{$item['l_thin_thickness']}" readonly style="width: 50px;" />μm
                                        </div>
                                        <div style="display:flex;flex-direction: row">
                                            <span>&nbsp;&nbsp;最大曲率&nbsp;&nbsp;</span><input type="text" value="{$item['l_max_curvature']}" readonly  style="width: 50px;" />D
                                        </div>
                                        <if condition="$item['l_overview_img']">
                                            <center> <img style="width: 700px;" src="{$item['l_overview_img']}"/></center>
                                            <center>左眼OVerView总览图</center>
                                        </if>
                                        <if condition="$item['l_bad_img']">
                                            <center><img style="width: 700px;" src="{$item['l_bad_img']}"   /></center>
                                            <center>左眼BAD分析图</center>
                                        </if>
                                        <if condition="$item['l_four_map_img']">
                                            <center><img style="width: 700px;" src="{$item['l_four_map_img']}"   /></center>
                                            <center>左眼屈光四图报告</center>
                                        </if>
                                        <if condition="$item['l_topometric_img']">
                                            <center><img style="width: 700px;" src="{$item['l_topometric_img']}"   /></center>
                                            <center>左眼圆锥角膜分级表</center>
                                        </if>
                                    </div>
                                </div>
                            </div>
                            <if condition="$item['contrast_img']">
                                <center><img style="width: 700px;" src="{$item['contrast_img']}"   /></center>
                                <center>双眼对比图</center>
                            </if>
                        </div>
                    </div>
                </div>
            </volist>

        </notempty>




    </div>
</block>

<block name="script">
    <script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>
    <script src="__STATIC__/layer/layer.js"></script>
    <script type="text/javascript" src="__STATIC__/bootstrap3.3.7/js/bootstrap.min.js"></script>
    <script type="text/javascript">
        $('.detail').click(function () {
            layer.open({
                area: ['800px', '700px'],
                title: '病历资料详情',
                type: 2,
                content: $(this).attr('data-href')
            })
        })

/*        $("#showAll").click(function(){
            $(".point").toggleClass("in");
        });*/
        $("#showAll").click(function(){
            $('.point').collapse('show')
        });





        highlight_subnav('{:U('Record/index')}');
    </script>
</block>
